﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Should.Fluent;

namespace CashFlow.Entities.Tests
{
	[TestClass]
	public class RecurrenceBaseTest
	{
		[TestMethod]
		public void GetNew_For_1_Returns_Once()
		{
			var actual = RecurrenceBase.GetNew("1");

			actual.Should().Be.OfType<RecurrenceOnce>();
		}

		[TestMethod]
		public void GetNew_For_MissedKey_Returns_Default()
		{
			var defaultType = RecurrenceBase.GetDefault().GetType();
			var actual = RecurrenceBase.GetNew("Id does not exist");

			actual.Should().Be.OfType(defaultType);
		}
	}
}
